/*
 * XML Type:  OpenOrderBuyOption
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.OpenOrderBuyOption
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML OpenOrderBuyOption(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class OpenOrderBuyOptionImpl extends net.ofx.types.x2003.x04.impl.AbstractOpenOrderImpl implements net.ofx.types.x2003.x04.OpenOrderBuyOption
{
    
    public OpenOrderBuyOptionImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName OPTBUYTYPE$0 = 
        new javax.xml.namespace.QName("", "OPTBUYTYPE");
    
    
    /**
     * Gets the "OPTBUYTYPE" element
     */
    public net.ofx.types.x2003.x04.OptionBuyEnum.Enum getOPTBUYTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OPTBUYTYPE$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.OptionBuyEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "OPTBUYTYPE" element
     */
    public net.ofx.types.x2003.x04.OptionBuyEnum xgetOPTBUYTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionBuyEnum target = null;
            target = (net.ofx.types.x2003.x04.OptionBuyEnum)get_store().find_element_user(OPTBUYTYPE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "OPTBUYTYPE" element
     */
    public void setOPTBUYTYPE(net.ofx.types.x2003.x04.OptionBuyEnum.Enum optbuytype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(OPTBUYTYPE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(OPTBUYTYPE$0);
            }
            target.setEnumValue(optbuytype);
        }
    }
    
    /**
     * Sets (as xml) the "OPTBUYTYPE" element
     */
    public void xsetOPTBUYTYPE(net.ofx.types.x2003.x04.OptionBuyEnum optbuytype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionBuyEnum target = null;
            target = (net.ofx.types.x2003.x04.OptionBuyEnum)get_store().find_element_user(OPTBUYTYPE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.OptionBuyEnum)get_store().add_element_user(OPTBUYTYPE$0);
            }
            target.set(optbuytype);
        }
    }
}
